//
//  ZHPlayerGesturesView.m
//  AVPlayerDemo
//
//  Created by 正合适 on 2017/10/31.
//  Copyright © 2017年 正合适. All rights reserved.
//

#import "ZHPlayerGesturesView.h"

@implementation ZHPlayerGesturesView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.userInteractionEnabled = YES;
        [self addGestures];
    }
    return self;
}

#pragma mark - 添加手势
- (void)addGestures {
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)];
    [self addGestureRecognizer:tap];
}

#pragma mark - 点击Action
- (void)tapAction {
    if (self.delegate && [self.delegate respondsToSelector:@selector(gesturesViewTap:)]) {
        [self.delegate gesturesViewTap:self];
    }
}
@end
